using namespace std;
using namespace dfa;

template <class DataType>
Transition<DataType>::Transition()
{
}

template <class DataType>
Transition<DataType>::Transition(DataType from, char sym, DataType to)
{
	fromState = from;
	toState = to;
	symbol = sym;
}

template <class DataType>
Transition<DataType>::Transition(const Transition<DataType> &transition)
{
	this->fromState = transition.fromState;
	this->toState = transition.toState;
	this->symbol = transition.symbol;
}

template <class DataType>
Transition<DataType>::~Transition()
{
}

template <class DataType>
DataType Transition<DataType>::getFromState()
{
	return fromState;
}

template <class DataType>
DataType Transition<DataType>::getToState()
{
	return toState;
}

template <class DataType>
char Transition<DataType>::getSymbol()
{
	return symbol;
}

template <class DataType>
bool Transition<DataType>::operator ==(const Transition<DataType> &right) const
{
	bool result;
	result = (fromState = right.fromState && toState = right.toState && symbol = right.symbol);
	return result;
}

template <class DataType>
bool Transition<DataType>::operator <(const Transition<DataType> &right) const
{
	if (this->fromState < right.fromState) {
			return true;
		} else if (this->fromState == right.fromState) {
			if (this->symbol < right.symbol) {
				return true;
			} else if (this->symbol == right.symbol){
				return this->toState < right.toState;
			}
		}
		return false;
}
